home *** CD-ROM | disk | FTP | other *** search
/ Space Shuttle - The First 100 Flights / Space Shuttle - The First 100 Flights.iso / trivia.dir / 00001_Script_1 next >
Text File  |  2000-11-09  |  2KB  |  62 lines

  1. on StartMovie
  2.   set the stageColor to 0
  3.   global gTriviaList, proceedVal, gTotalTrivia, gCorrect
  4.   
  5.   gTotalTrivia = 20
  6.   
  7.   if count(gTriviaList) = gTotalTrivia then go to frame "exit" -- all done, no more qeustions
  8.   
  9.   proceedVal = false
  10.   
  11.   -- check to see if the question has been asked
  12.   
  13.   repeat while proceedVal = false
  14.     curQuestion = random(gTotalTrivia)
  15.     if curQuestion = 0 then curQuestion = 1
  16.     compareList curQuestion
  17.   end repeat
  18.   
  19.   -- continue
  20.   
  21.   global gTriviaQuestion, gTriviaAnswer1, gTriviaAnswer2, gTriviaAnswer3, gTriviaAnswer4, gTriviaCorrect
  22.   
  23.   question = getAt(gTriviaQuestion, curQuestion)
  24.   answer1 = getAt(gTriviaAnswer1, curQuestion)
  25.   answer2 = getAt(gTriviaAnswer2, curQuestion)
  26.   answer3 = getAt(gTriviaAnswer3, curQuestion)
  27.   answer4 = getAt(gTriviaAnswer4, curQuestion)
  28.   gCorrect = getAt(gTriviaCorrect, curQuestion)
  29.   
  30.   singlebreak = "<br>"
  31.   doublebreak = "<br><br>"
  32.   dblquote = """
  33.   singlequote = "´"
  34.   set the text of member 3 to question
  35.   set the text of member 4 to answer1
  36.   set the text of member 5 to answer2
  37.   set the text of member 6 to answer3
  38.   set the text of member 7 to answer4
  39.   
  40. end
  41.  
  42. on compareList thequestion
  43.   
  44.   global gTriviaList, proceedVal
  45.   
  46.   match = false
  47.   
  48.   repeat with n = 1 to count(gTriviaList)
  49.     if getAt(gTriviaList,n) = thequestion then match = true
  50.   end repeat
  51.   
  52.   if match then
  53.     proceedVal = false
  54.   else
  55.     proceedVal = true
  56.     add(gTriviaList,thequestion)
  57.   end if
  58.   
  59. end compareList
  60.  
  61.  
  62.